New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@apollo-elements/lib

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo-elements/lib

Library functions for apollo-elements

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77
decreased by-39.37%
Maintainers
1
Weekly downloads
 
Created
Source

@apollo-elements/lib

Helper functions for Apollo Elements

getGraphQLScriptChildDocument

Gets the gql-parsed DocumentNode from a direct <script type="application/graphql"> child of an element.

function getGraphQLScriptChildDocument(element: HTMLElement): DocumentNode | null;

gqlFromInnerText

Gets an element's innerText and parses it as GraphQL.

function gqlFromInnerText(element: HTMLScriptElement): DocumentNode | null

hasAllVariables

Predicate that validates a GraphQL request (a DocumentNode and a variables object) as having all of its required (i.e. non-nullable) variables defined.

function hasAllVariables(params: { query: DocumentNode, variables: any }): boolean

isClientOperation

Predicate that validates a DocumentNode as being an exclusively client-side operation, i.e. all of it's requests are modified by a @client directive.

function isClientOperation(operation: Operation): boolean

isValidGql

Predicate that validates an object as a DocumentNode.

function isValidGql(document: DocumentNode | any): boolean

Keywords

FAQs

Package last updated on 09 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc